package 设计模式.创建型模式.demo04原型模式.demo03深拷贝;

/**
 * @author: 王富贵
 * @description: 主启动类
 * @createTime: 2022/11/07 16:09
 */
public class Application {
    public static void main(String[] args) throws CloneNotSupportedException {
        Tree tree = new Tree("森林", "水");
        System.out.println(tree.toString());

        Tree cloneTree = (Tree) tree.clone();
        System.out.println(cloneTree.toString());

        System.out.println(tree.getName() == cloneTree.getName());
    }
}
